package LECONGHAU.OOP.LUYENTAP.BAI1;

import java.util.Scanner;

public class VIEWS {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
CONTRONLLERS con =new CONTRONLLERS();
double x1,x2;
System.out.println("moi nhap a");
Scanner sc=new Scanner(System.in);
double a=sc.nextDouble();
System.out.println("nhap b");
double b=sc.nextDouble();
System.out.println("nhap c");
double c=sc.nextDouble();

con.ptb2(a,b,c);
if(con.m_objModel.delta<0){
	System.out.println("phuong trinh vo nghiem");
}else if (con.m_objModel.delta>0) {
	x1=(-b+Math.sqrt(con.m_objModel.delta))/(2*a);
	x2=(-b-Math.sqrt(con.m_objModel.delta))/(2*a);
	System.out.println("phuong trinh co 2 nghiem x1= "+x1+ "\nx2= "+x2);
}else {
	x1=-b/2/a;
	System.out.println("phuong trinh co nghiem kep la x1= "+x1);
}
	}

}
